﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace NSATBPortal
{
    public partial class NavTree : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
               
                // Root (ATB)
                TreeNode objRootNode;
                objRootNode = new TreeNode();
                objRootNode.Text = "&nbsp;Phoenix ATB Menu";
                objRootNode.Target = "DetailsPane";
                objRootNode.ImageUrl = "~/content/images/treeset/phoenix_icon16true.png";
                objRootNode.NavigateUrl = "Dashboard.aspx";

                // Dashboard
                TreeNode objSubNode;
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Dashboard";
                objSubNode.ImageUrl = "~/content/images/treeset/dashboard.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "Dashboard.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Profiles
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Profiles";
                objSubNode.ImageUrl = "~/content/images/treeset/profiles.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "ProfilesHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Test Cases
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Test Cases";
                objSubNode.ImageUrl = "~/content/images/treeset/testcase.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "TestCaseHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Test Sets
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Test Sets";
                objSubNode.ImageUrl = "~/content/images/treeset/testset.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "TestSetHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Base States
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Base States";
                objSubNode.ImageUrl = "~/content/images/treeset/basestate.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "BaseStateHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Data Sets
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Data Sets";
                objSubNode.ImageUrl = "~/content/images/treeset/dataset.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "TestDataSetHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Machines
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Machines";
                objSubNode.ImageUrl = "~/content/images/treeset/machines.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "MachinesHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Machine Groups
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Machine Groups";
                objSubNode.ImageUrl = "~/content/images/treeset/machinegroup.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "MachineGroupHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Notification Groups
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Notification Groups";
                objSubNode.ImageUrl = "~/content/images/treeset/notificationgroup.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "NotificationGroupHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Run Definitions
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Run Definitions";
                objSubNode.ImageUrl = "~/content/images/treeset/defrun.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "DefRunHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Runs Schedule
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Runs Schedule";
                objSubNode.ImageUrl = "~/content/images/treeset/runssched.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "RunsHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Runs Journal
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Runs Journal";
                objSubNode.ImageUrl = "~/content/images/treeset/runsjournal.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "RunsJournalHome.aspx";
                objRootNode.ChildNodes.Add(objSubNode);

                // Lists
                TreeNode objListsNode;
                objListsNode = new TreeNode();
                objListsNode.Text = "&nbsp;Lists";
                objListsNode.ImageUrl = "~/content/images/treeset/folder.png";
                objListsNode.Expanded = false;
                objRootNode.ChildNodes.Add(objListsNode);

                // List: Action Words
                objSubNode = new TreeNode();
                objSubNode.Text = "&nbsp;Action Words";
                objSubNode.ImageUrl = "~/content/images/treeset/list.png";
                objSubNode.Target = "DetailsPane";
                objSubNode.NavigateUrl = "ListActionWordsHome.aspx";
                objListsNode.ChildNodes.Add(objSubNode);

                tvNavigation.Nodes.Clear();
                tvNavigation.Nodes.Add(objRootNode);
            }
        }
        
    }


}
